<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ include file="/WEB-INF/views/include/constrant.jsp"%>
<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>发票管理-开票信息</title>
		<link rel="stylesheet" href="${ctxStatic }/gov/css/gov-invoice.css" />
		<link rel="stylesheet" href="${ctxStatic }/gov/css/gov_total.css" />
		<script type="text/javascript" src="${ctxStatic }/gov/js/jquery-1.8.3.min.js"></script>
		<script type="text/javascript" src="${ctxStatic }/gov/js/jquery.validate.js"></script>
		<script type="text/javascript" src="${ctxStatic }/gov/js/messages_zh.js"></script>
	</head>
	<script>
		$(function(){
			
			/*表单验证*/
			
			$('#invsubmit').validate({
				rules:{
					title: "required",
					receiver: "required",
					mobile:{
					required:true,
					isMobile : true
				},
				address: "required",
				postcode: "required"

				},
				messages:{
					title: "<i class='verico'></i>请输入个人/企业名称",
					
					receiver: "<i class='verico'></i>请输入收件人姓名",
					mobile:{
					required:"<i class='verico'></i>请输入手机号码",
					isMobile:"<i class='verico'></i>请输入正确手机号码"
				},
				address: "<i class='verico'></i>请输入邮寄地址",
				postcode:"<i class='verico'></i>请输入邮编" 
				
				},
              //提交表单后，（第一个）未通过验证的表单获得焦点  
                focusInvalid:true,  
              //当未通过验证的元素获得焦点时，移除错误提示  
                focusCleanup:true,
			});

				/*手机验证*/
	        jQuery.validator.addMethod("isMobile", function(value, element) {
	            var length = value.length;
	            var mobile = /^(13[0-9]{9})|(18[0-9]{9})|(14[0-9]{9})|(17[0-9]{9})|(15[0-9]{9})$/;
	            return this.optional(element) || (length == 11 && mobile.test(value));
	        }, "请正确填写您的手机号码");
	        
	        /*纳税人验证*/
	        jQuery.validator.addMethod("tax", function(value, element) {
	            var length = value.length;
	            var  taxd = /^[A-Z0-9]{15}$|^[A-Z0-9]{17}$|^[A-Z0-9]{18}$|^[A-Z0-9]{20}$/;
	            return this.optional(element) || (length == 11 && mobile.test(value));
	        }, "请正确填写纳税号");
		})
	</script>

	<body>
		<%@include file="../index/head.jsp" %>
		<div id="invoice_h">
			<div class="invoice_main">
				<div class="inv-open clearfix">
					<div class="inv-open-tit">
						<h5>发票信息管理</h5>
					</div>
					<div class="inv-open-box clearfix">
						<form id="invsubmit"  action="${ctxGov }/saveRcpt" method="post">
						<input type="hidden" name="rcptIds" value="${rcptIds}"/>
						<input type="hidden" name="outtimefee" value="${totalOuttimefee}"/>
						<input type="hidden" name="outkmsfee" value="${totalOutkmsfee}"/>
						<input type="hidden" name="dirverfee" value="${totalRirverfee}"/>
							<div class="inv-op-il">
								<span>发票类型：</span>
								<label>
			 	  	  	  	 	 	<input type="checkbox" name= "rcpttype" checked="checked" class="inv-che-ii"/>
			 	  	  	  	 	 	<font>增值税普通发票</font>
			 	  	  	  	 	 </label>
							</div>
							<div class="inv-op-il">
								<span>发票抬头：</span>
								<input type="text" placeholder="个人/企业名称" id="invoice1" name="title" value="${tUsersRcpt.title }"/>
							</div>
							<div class="inv-op-il">
								<span>纳税人识别号：</span>
								<input type="text" placeholder="企业必填" id="invoice2" name="dutyParagraph" value="${tUsersRcpt.dutyParagraph }"/>
							</div>
							<div class="inv-op-il">
								<span>发票内容：</span>
								<input type="text" placeholder="代办租车费" disabled="true" style="background: #f2f2f2;" name="content" />
							</div>
							<div class="inv-op-il">
								<span>收件人：</span>
								<input type 吗="text" placeholder="请输入收件人名称" id="invoice3" name="receiver" value="${tUsersRcpt.receiver }"/>
							</div>
							<div class="inv-op-il">
								<span>手机号：</span>
								<input type="text" placeholder="请输入手机号" id="invoice4" name="mobile" value="${tUsersRcpt.mobile }"/>
							</div>
							<div class="inv-op-il">
								<span>邮寄地址：</span>
								<input type="text" placeholder="请输入收件地址" id="invoice5" name="address" value="${tUsersRcpt.address }"/>
							</div>
							<div class="inv-op-il">
								<span>邮编：</span>
								<input type="text" placeholder="请输入邮编" id="invoice6" name="postcode" value="${tUsersRcpt.postcode}"/>
							</div>
							<div class="inv-op-apr">
								<button type="submit" class="inv-sub-x">提交</button>
								<a onclick="history.go(-1)">返回</a>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
		<div id="inv-subit">
			<div class="inv-sb-box">
				<p>您的发票信息已提交成功！</p>
				<p>
					<button type="button">确定</button>
				</p>
			</div>
		</div>
		<%@include file="../index/foot.jsp" %>
	</body>

</html>